//system API wrapper
// $Id: sys_api.cpp 156 2009-09-06 12:37:50Z Oleg.Bulychov $

#include "stdafx.h"

#include "src/heo/include/sys_api.h"

#if defined(_WIN32)

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#else

//TODO better detection of pthread
#include <pthread.h>
#include <sched.h>

#endif

namespace sys_api
{

void Yield_Thread()
{
#if defined(_WIN32)

    ::SwitchToThread();

#else

    ::sched_yield();

#endif

}

}

//EOF!
